home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: Borland C's tmpnam()
- Date: Sun, 24 Mar 96 00:19:50 GMT
- Organization: none
- Message-ID: <827626790snz@genesis.demon.co.uk>
- References: <AD75E5DC9668E2A52@mcdiala13.it.luc.edu> <Pine.A32.3.91.960322134158.23347A-100000@red.weeg.uiowa.edu> <AD78E5E796681EC58@mcdialb10.it.luc.edu>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <AD78E5E796681EC58@mcdialb10.it.luc.edu>
- VArase@varase.it.luc.edu "Verne Arase" writes:
-
- >In article <Pine.A32.3.91.960322134158.23347A-100000@red.weeg.uiowa.edu>,
- >The Amorphous Mass <robinson@blue.weeg.uiowa.edu> wrote:
- >
- > >> The online documentation (all I have) says that it returns a file name
- > >> "which can be safely used as the name of a temporary file".
- > >>
- > >> What does this mean?
- > >
- > > It means that it generates a filename that is guaranteed to be unique
- > >-- ie it won't overwrite an existing file.
- >
- >Another EMail response I got suggests otherwise. The fact that they didn't
- >provide a path parameter also suggests that they weren't terribly serious.
-
- The implementation decides where to put it, whether in the current directory
- or not.
-
- >The other response I mentioned said that (_my synopsis_) all it guaranteed
- >was that the provided file name is compatible with your file system.
-
- That is wrong. The standard says (7.9.9.4)
-
- "The tempnam function generates a string that is a valid file name and that
- is not the name of an existing file."
-
- >If it did more I'd expect that to be documented and flagged as a Borland
- >non-portable extension.
-
- It is standard.
-
- >It seems to be a good start for a serious tempname(), however :-).
-
- The C language standard has no concept of a directory so, unless I
- misunderstand you, I can't see what this would do differently from
- tmpnam().
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-